﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.SqlServerCe;

namespace Payroll
{
    public partial class EmployeeListForm : Form
    {
        public EmployeeListForm()
        {
            InitializeComponent();
        }

        private void EmployeeListForm_Load(object sender, EventArgs e)
        {
            string connString = @"Data Source=..\..\Database1.sdf";
            SqlCeConnection connection = new SqlCeConnection(connString);
            connection.Open();

            string sqlStr = "select * from Summarytable order by id";
            DataSet dataSet = new DataSet();
            SqlCeDataAdapter sqldata = new SqlCeDataAdapter(sqlStr, connString);
            sqldata.Fill(dataSet, "Summarytable");
            DataView dataView = new DataView(dataSet.Tables["Summarytable"]);
            dataGridView1.DataSource = dataView;

            myFile.myWrite_operate(myUser.Name,"查看用户列表");
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
    }
}
